@extends('store::modal')
@section('title',$page_title??'上传图片')
@push('styles')
    <link href="{{asset(config('store.plugin').'/webuploader/css/webuploader.css')}}" rel="stylesheet">
    <link href="{{asset(config('store.plugin').'/webuploader/css/uploader.css')}}" rel="stylesheet">
@endpush
@section('content')
        <div id="uploader" class="uploader-box" style="margin: 0;">
            <div class="queueList">
                <div  class="placeholder">
                    <div id="filePicker"></div>
                    <p>或将照片拖到这里，单次最多可选{{$img_num}}张</p>
                </div>
            </div>
            <div class="statusBar" style="display:none;">
                <div class="progress">
                    <span class="text">0%</span>
                    <span class="percentage"></span>
                </div><div class="info"></div>
                <div class="btns">
                    <div id="filePicker2"></div><div class="uploadBtn">开始上传</div>
                </div>
            </div>
        </div>
@endsection
@push('scripts')
    <script src="{{asset(config('store.plugin').'/webuploader/js/webuploader.html5only.min.js')}}"></script>
    <script src="{{asset(config('store.plugin').'/webuploader/js/imguploader.js')}}"></script>
    <script>
        $.imgUploader({
            boxId:"uploader",
            pickId:"filePicker",
            againBtnId:"filePicker2",
            fileVal:"website",
            parentBoxId:"{{$parent_box_id}}",
            fileNumLimit:"{{$img_num??1}}",
            image_group:"{{$group}}",
            serverUrl:"{{route('store_Uploader_server')}}",
        })
    </script>
@endpush